package com.ruoyi.manager.controller;

import com.ruoyi.manager.mapper.TeacherAnalysisMapper;
import com.ruoyi.manager.service.TeachAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@RequestMapping("/manager/analysis")
@Controller
public class AnalysisController {

    @Autowired
    TeachAnalysisService teachAnalysisService;

    @RequestMapping("/teachAnalysisPage")
    public String toTeachAnalysisPage(){
        return "redirect:/analysis/teachAnalysis.html";
    }

    @RequestMapping("/masterAnalysisPage")
    public String masterAnalysisPage(){
        return "redirect:/analysis/masterAnalysis.html";
    }
    @ResponseBody
    @RequestMapping("/listClssesInfo")
    public List<Map<String,Object>> listClassesInfor(){
        return teachAnalysisService.listClassesInfor();
    }

    @ResponseBody //将返回值对象转换成json数据返回
    @RequestMapping("/allClassCoreTaskComRateAndSubRate")
    public List<Map<String, Object>> allClassCoreTaskComRateAndSubRate() {
        return teachAnalysisService.allClassCoreTaskComRateAndSubRate();
    }
    @ResponseBody //将返回值对象转换成json数据返回
    @RequestMapping("/listOfFourtyPresentStudentInfo")
    public List<Map<String, Object>> listOfFourtyPresentStudentInfo() {
        return teachAnalysisService.listOfFourtyPresentStudentInfo();
    }
    @ResponseBody
    @RequestMapping("/listClassesAvgScore")
    public List listClassesAvgScore(){
        return teachAnalysisService.listClassesAvgScore();
    }
    @ResponseBody
    @RequestMapping("/scoreClassification")
    public Map scoreClassification(){
        return teachAnalysisService.scoreClassification();
    }
    @ResponseBody
    @RequestMapping("/findAllClassesSumScoreAndAvgScore")
    public Map findAllClassesSumScoreAndAvgScore(){
        return teachAnalysisService.findAllClassesSumScoreAndAvgScore();
    }
    @ResponseBody //将返回值对象转换成json数据返回
    @RequestMapping("/avgCompeteRateOfDay")
    public List<Map<String, Object>> avgCompeteRateOfDay() {
        return teachAnalysisService.avgCompeteRateOfDay();
    }
    @ResponseBody
    @RequestMapping("/findClassesCoreTaskFourtyPresentRate")
    public Map findClassesCoreTaskFourtyPresentRate(){
        return teachAnalysisService.findClassesCoreTaskFourtyPresentRate();
    }
    @ResponseBody
    @RequestMapping("/findClassesCoreTaskEigtyPresentRate")
    public Map findClassesCoreTaskEigtyPresentRate(){
        return teachAnalysisService.findClassesCoreTaskEigtyPresentRate();
    }
    @ResponseBody
    @RequestMapping("/findClassesCoreTaskCompleteRate")
    public Map findClassesCoreTaskCompleteRate(){
        return teachAnalysisService.findClassesCoreTaskCompleteRate();
    }
    @ResponseBody
    @RequestMapping("/findClassesCoreTaskSubmitRate")
    public Map findClassesCoreTaskSubmitRate(){
        return teachAnalysisService.findClassesCoreTaskSubmitRate();
    }
    @ResponseBody
    @RequestMapping("/CoreSumOfMaster")
    public List CoreSumOfMaster(){
        return teachAnalysisService.CoreSumOfMaster();
    }
    @ResponseBody
    @RequestMapping("/CoreSumOfWeek")
    public List CoreSumOfWeek(){
        return teachAnalysisService.CoreSumOfWeek();
    }

}
